package com.zzc.study.controller;


import com.zzc.study.service.ChatAssistant;
import com.zzc.study.service.ChatAssistantDeepSeek;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j
public class DeclarativeAIServiceController
{
    @Resource(name = "qwenAssistant")
    private ChatAssistant chatAssistantQwen;
    @Resource(name = "deepseekAssistant")
    private ChatAssistantDeepSeek chatAssistantDeepSeek;

    // http://localhost:9012/chatapi/highapi
    @GetMapping(value = "/chatapi/highapi")
    public String highApi(@RequestParam(value = "prompt", defaultValue = "你是谁") String prompt)
    {
        return chatAssistantQwen.chat(prompt);
    }

    // http://localhost:9012/chatapi/highapi02
    @GetMapping(value = "/chatapi/highapi02")
    public String highApi02(@RequestParam(value = "prompt", defaultValue = "你是谁") String prompt)
    {
        return chatAssistantDeepSeek.chat(prompt);
    }
}
